#!/bin/sh

root=`pwd`

cppLine=`for i in $(find . | grep ".cpp$") ; do cat $i ; done | wc -l`
hLine=`for i in $(find . | grep ".h$") ; do cat $i ; done | wc -l`
shLine=`for i in $(find . | grep ".sh$") ; do cat $i ; done | wc -l`

allLine=$((cppLine + hLine + shLine))
echo "cpp : $cppLine"
echo "h   : $hLine"
echo "sh  : $shLine"
echo "All your code counted has ${allLine} lines."